package proxy.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.util.Calendar;

public class Client {
	public static void main(String[] args) {
		IGamePlayer gamePlayer = new GamePlayer("张三");
		InvocationHandler handler = new GamePlayIH(gamePlayer);
		IGamePlayer proxy = 
				(IGamePlayer)Proxy.newProxyInstance(gamePlayer.getClass().getClassLoader(),new Class[]{IGamePlayer.class}, handler);
		System.out.println(Calendar.getInstance().getTime().toLocaleString());
		proxy.login("张三", "123445");
		proxy.killBoss();
		proxy.upgrade();
		System.out.println("结束时间是：2009-8-26 03:40");
		
	}
}
